"example MODULE.bazel to test bzlmod integration for bazeldnf without a prebuilt toolchain"

module(name = "example-bazeldnf-bzlmod-issues-with-ignore-flag")

bazel_dep(name = "bazeldnf", dev_dependency = True)
local_path_override(
    module_name = "bazeldnf",
    path = "../..",
)

bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_go", version = "0.53.0", repo_name = "rules_go")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.24.1")

bazel_dep(name = "gazelle", version = "0.42.0")
bazel_dep(name = "toolchains_protoc", version = "0.3.7")

protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
    google_protobuf = "com_google_protobuf",
    version = "v27.3",
)
use_repo(protoc, "com_google_protobuf", "toolchains_protoc_hub")

register_toolchains(
    "@toolchains_protoc_hub//:all",
    dev_dependency = True,
)

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "@bazeldnf//:go.mod")
use_repo(
    go_deps,
    "com_github_adrg_xdg",
    "com_github_bazelbuild_buildtools",
    "com_github_crillab_gophersat",
    "com_github_jdx_go_netrc",
    "com_github_klauspost_compress",
    "com_github_onsi_gomega",
    "com_github_sassoftware_go_rpmutils",
    "com_github_sirupsen_logrus",
    "com_github_spf13_cobra",
    "io_k8s_sigs_yaml",
    "org_golang_x_crypto",
    "org_golang_x_exp",
)

bazeldnf_toolchain = use_extension("@bazeldnf//bazeldnf:extensions.bzl", "bazeldnf_toolchain")
bazeldnf_toolchain.register(disable = True)

bazeldnf = use_extension("@bazeldnf//bazeldnf:extensions.bzl", "bazeldnf")
bazeldnf.config(
    name = "bazeldnf_rpms",
    cache_dir = "./.bazeldnf-test-issues-with-ignore-flag",
    excludes = [
        "alternatives",
        "basesystem",
    ],
    ignore_deps = False,
    lock_file = "//:bazeldnf-lock.json",
    repofile = "//:repos.yaml",
    rpms = [
        "git",
        "glibc",
    ],
)
use_repo(
    bazeldnf,
    "bazeldnf_rpms",
)
